package com.yunmang.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.yunmang.entity.DatabaseEntity.EndStationBean;
import com.yunmang.entity.DatabaseEntity.Student;
import com.yunmang.entity.DatabaseEntity.TransportDatabase;
import com.yunmang.entity.DatabaseEntity.ArriveDatabase;

import com.yunmang.greendao.gen.EndStationBeanDao;
import com.yunmang.greendao.gen.StudentDao;
import com.yunmang.greendao.gen.TransportDatabaseDao;
import com.yunmang.greendao.gen.ArriveDatabaseDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig endStationBeanDaoConfig;
    private final DaoConfig studentDaoConfig;
    private final DaoConfig transportDatabaseDaoConfig;
    private final DaoConfig arriveDatabaseDaoConfig;

    private final EndStationBeanDao endStationBeanDao;
    private final StudentDao studentDao;
    private final TransportDatabaseDao transportDatabaseDao;
    private final ArriveDatabaseDao arriveDatabaseDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        endStationBeanDaoConfig = daoConfigMap.get(EndStationBeanDao.class).clone();
        endStationBeanDaoConfig.initIdentityScope(type);

        studentDaoConfig = daoConfigMap.get(StudentDao.class).clone();
        studentDaoConfig.initIdentityScope(type);

        transportDatabaseDaoConfig = daoConfigMap.get(TransportDatabaseDao.class).clone();
        transportDatabaseDaoConfig.initIdentityScope(type);

        arriveDatabaseDaoConfig = daoConfigMap.get(ArriveDatabaseDao.class).clone();
        arriveDatabaseDaoConfig.initIdentityScope(type);

        endStationBeanDao = new EndStationBeanDao(endStationBeanDaoConfig, this);
        studentDao = new StudentDao(studentDaoConfig, this);
        transportDatabaseDao = new TransportDatabaseDao(transportDatabaseDaoConfig, this);
        arriveDatabaseDao = new ArriveDatabaseDao(arriveDatabaseDaoConfig, this);

        registerDao(EndStationBean.class, endStationBeanDao);
        registerDao(Student.class, studentDao);
        registerDao(TransportDatabase.class, transportDatabaseDao);
        registerDao(ArriveDatabase.class, arriveDatabaseDao);
    }
    
    public void clear() {
        endStationBeanDaoConfig.clearIdentityScope();
        studentDaoConfig.clearIdentityScope();
        transportDatabaseDaoConfig.clearIdentityScope();
        arriveDatabaseDaoConfig.clearIdentityScope();
    }

    public EndStationBeanDao getEndStationBeanDao() {
        return endStationBeanDao;
    }

    public StudentDao getStudentDao() {
        return studentDao;
    }

    public TransportDatabaseDao getTransportDatabaseDao() {
        return transportDatabaseDao;
    }

    public ArriveDatabaseDao getArriveDatabaseDao() {
        return arriveDatabaseDao;
    }

}
